<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<%@ page import="hackathon1212.UserDAO" %>
<%@ page import="com.google.appengine.api.users.UserServiceFactory" %>
<%
if(UserDAO.get().allowed(request.getUserPrincipal())){
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<!--
Design by Free CSS Templates
http://www.freecsstemplates.org
Released for free under a Creative Commons Attribution 2.5 License

Name       : Murky Stairwell 
Description: A two-column, fixed-width design with dark color scheme.
Version    : 1.0
Released   : 20130405

-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta name="keywords" content="" />
<meta name="description" content="" />
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>hackathon2</title>
<link href="css/style.css" rel="stylesheet" type="text/css" media="screen" />
</head>
<body>
<div id="wrapper">
	<div id="header-wrapper">
		<div id="header" class="container">
			<div id="logo">
				<h1>hackathon<span class="orange">2</span></h1>
			</div>
			<div id="menu">
				<ul>
					<li class="current_page_item"><a href="#">Homepage</a></li>
					<li><a href="#">Teams</a></li>
					<li><a href="https://teams.aexp.com/sites/aet_uk_ce/TalentDevelopment/SitePages/Hackathon2.aspx">About</a></li>
				</ul>
			</div>
		</div>
		<div id="banner">
			<div class="content"><img src="images/img02.jpg" width="1000" height="300" alt="" />
				<p id="name"><%= request.getUserPrincipal() %> <a href="<%=UserServiceFactory.getUserService().createLogoutURL(request.getRequestURI())%>">sign out</a></p>
			</div>
		</div>
	</div>
	<!-- end #header -->
	
	<div id="page">
		<div id="content">
			<div class="post-heading">
				<h2>AMEX <span class="orange">APIs</span><a id="data-link" href="data.jsp">(data)</a></h2>
			</div>
			<div class="post">
				<a href="#" class="expander expander-down"></a>
				<h2 class="api-head">Membership Rewards API</h2>
				<div class="expandable">
					<h3 class="api-subhead">Pay WIth Points</h3>
					<ul>
						<li>getpointbalance<span class="api-strapline"> - get the balance for a member's account</span></li>
						<li>cashtopoints<span class="api-strapline"> - convert cash amount to points amount</span></li>
						<li>pointstocash<span class="api-strapline"> - convert points amount to cash amount</span></li>
						<li>redeempoints<span class="api-strapline"> - redeem (spend points)</span></li>
						<li>redeemcash<span class="api-strapline"> - spend cash</span></li>
					</ul>
					<h3 class="api-subhead">Bonus Offers</h3>
					<ul>
						<li>getbonusoffers<span class="api-strapline"> - get the offers for a Cardmember</span></li>
						<li>enroloffer<span class="api-strapline"> - enrol in an offer</span></li>
					</ul>
					<h3 class="api-subhead">MR Catalogue</h3>
					<ul>
						<li>searchcatalogue<span class="api-strapline"> - look for goods in the catalogue</span></li>
						<li>placeorder<span class="api-strapline"> - use points to buy something from the catalogue</span></li>
						<li>depositpoints<span class="api-strapline"> - adds a set number of points to an MR account</span></li>
					</ul>
					<p class="links"><a href="memberrewards.jsp" class="more">API Spec</a></p>
				</div>
			</div>
			<div class="post">
				<a href="#" class="expander expander-down"></a>
				<h2 class="api-head">Accounts Receivable API</h2>
				<div class="expandable">
					<ul>
						<li>accountdetails<span class="api-strapline"> - get Cardmember account details</span></li>
						<li>transactions<span class="api-strapline"> - get details of a transaction</span></li>
					</ul>
					<p class="links"><a href="ar.jsp" class="more">API Spec</a></p>
				</div>
			</div>
			<div class="post">
				<a href="#" class="expander expander-down"></a>
				<h2 class="api-head">Payment Gateway API</h2>
				<div class="expandable">
					<ul>
						<li>pay<span class="api-strapline"> - submit a payment transaction</span></li>
						<li>refund<span class="api-strapline"> - refund a payment transaction</span></li>
						<li>retrieve<span class="api-strapline"> - get payment transaction details</span></li>
						<li><a href="https://secure.uat.tnspayments.com/ma/">https://secure.uat.tnspayments.com/ma/</a><span class="api-strapline"> - sandbox environment</span></li>
						<li>details<span class="api-strapline"> - # 345678901234564 exp 05/13 csc 0000 </span></li>
						<li>login<span class="api-strapline"> - MerchantID TestUKDigitalHub, op your_twitter_id, password hackathon2 </span></li>
						<li>api key<span class="api-strapline"> - dbdd839c0767c2fc34561c8c4a6c42ed </span></li>
					</ul>
					<p class="links"><a href="https://gateway-na.americanexpress.com/api/documentation" class="more">API Spec</a></p>
				</div>
			</div>
			<div class="post">
				<a href="#" class="expander expander-down"></a>
				<h2 class="api-head">Serve API</h2>
				<div class="expandable">
					<ul>
						<li>pay<span class="api-strapline"> - send funds</span></li>
					</ul>
					<p>Credentials for API Spec - id: devextest, pwd: Dev1four</p>
					<p class="links"><a href="http://devexqa.atmos.phe.re" class="more">API Spec</a></p>
				</div>
			</div>
			<div class="post">
				<a href="#" class="expander expander-down"></a>
				<h2 class="api-head">Merchant API</h2>
				<div class="expandable">
					<ul>
						<li>showMerchantDetails<span class="api-strapline"> - get details of single merchant</span></li>
						<li>search<span class="api-strapline"> - get details of merchant based on Post Code</span></li>
						<li>createMerchant<span class="api-strapline"> - create or update a merchant</span></li>
						<li>showSettlements<span class="api-strapline"> - get settlements associated related to a merchant and date range</span></li>
						<li>createSettlementDetail<span class="api-strapline"> - create a settlement</span></li>
						<li>createSoc<span class="api-strapline"> - create summary of charge (group of settlement accounts)</span></li>
						<li>showSoc<span class="api-strapline"> - show summary of charge (group of settlement accounts)</span></li>
						<li>showSocsInSettlement<span class="api-strapline"> - show summary of charges (group of settlement accounts) in settlements</span></li>
						<li>createRoc<span class="api-strapline"> - create ROC (Record Of Charge)</span></li>
						<li>showRoc<span class="api-strapline"> - show ROC (Record Of Charge)</span></li>
						<li>showRocs<span class="api-strapline"> - show ROCs (Records Of Charge)</span></li>
					</ul>
					<p class="links"><a href="merchant.jsp" class="more">API Spec</a></p>
				</div>
			</div>
			<div class="post">
				<a href="#" class="expander expander-down"></a>
				<h2 class="api-head">PayBack API</h2>
				<div class="expandable">
					<ul>
						<li>enrollMember<span class="api-strapline"> - enrol a new member</span></li>
						<li>blockMember<span class="api-strapline"> - block a member</span></li>
						<li>checkPointBalance<span class="api-strapline"> - get points balance of member</span></li>
						<li>collectPoints<span class="api-strapline"> - add points to the balance of a member</span></li>
						<li>redeemPoints<span class="api-strapline"> - reduce points of member as if redeeming</span></li>
					</ul>
					<p class="links"><a href="coalition.jsp" class="more">API Spec</a></p>
				</div>
			</div>
			<div class="post">
				<a href="#" class="expander expander-down"></a>
				<h2 class="api-head">Corporate Cards API</h2>
				<div class="expandable">
					<ul>
						<li>getCordIDs<span class="api-strapline"> - get corpate IDs</span></li>
						<li>getCorpByID<span class="api-strapline"> - get a corporate by its ID</span></li>
						<li>getCorpNameByID<span class="api-strapline"> - get a corp name by ID</span></li>
						<li>getControlAccount<span class="api-strapline"> - get a control account</span></li>
						<li>getCardAccount<span class="api-strapline"> - get a card account</span></li>
						<li>getCardAccountBalance<span class="api-strapline"> - get a card account balance</span></li>
					</ul>
					<p class="links"><a href="corp.jsp" class="more">API Spec</a></p>
				</div>
			</div>
			<div class="post">
				<a href="#" class="expander expander-down"></a>
				<h2 class="api-head">Card Services API</h2>
				<div class="expandable">
					<ul>
						<li>getUserCard<span class="api-strapline"> - get a card based on age and salary</span></li>
						<li>getCardOnAnnualFee<span class="api-strapline"> - get a card on a specific annual fee</span></li>
						<li>getAllCardsInfo<span class="api-strapline"> - get all cards and details</span></li>
						<li>cardDetail<span class="api-strapline"> - get the details of a card</span></li>
					</ul>
					<p class="links"><a href="http://hackathon20now.appspot.com/" class="more">API Spec</a></p>
				</div>
			</div>
			<div class="post">
				<a href="#" class="expander expander-down"></a>
				<h2 class="api-head">Registered Card API</h2>
				<div class="expandable">
					<ul>
						<li>enrolments<span class="api-strapline"> - get all enrolments, get a specific enrolment, or create a new enrolment</span></li>
						<li>offers<span class="api-strapline"> - get all offers, or get offers specific to a category</span></li>
					</ul>
					<p class="links"><a href="http://ec2-54-217-248-122.eu-west-1.compute.amazonaws.com/" class="more">API Spec</a></p>
				</div>
			</div>
			<div class="post external-post">
				<h2 class="api-head">FB Modules API</h2>
				<a class="external-api-link" href="http://www.digitalhub.org.uk/facebook-modules-documentation/destination/html/">API Spec</a>
			</div>
			<div class="post external-post">
				<h2 class="api-head">DH Twitter API</h2>
				<a class="external-api-link" href=" http://www.digitalhub.org.uk/twitter-modules/documentation.xlsx">API Spec</a>
			</div>
			<div style="clear: both;">&nbsp;</div>
			<div class="post-heading ext-heading">
				<h2>External <span class="orange">APIs</span></h2>
			</div>
			<div class="post external-post">
				<h2 class="api-head">Twitter API</h2>
				<a class="external-api-link" href="https://dev.twitter.com/">API Spec</a>
			</div>
			<div class="post external-post">
				<h2 class="api-head">Facebook API</h2>
				<a class="external-api-link" href="http://developers.facebook.com/">API Spec</a>
			</div>
			<div class="post external-post">
				<h2 class="api-head">Google Maps API</h2>
				<a class="external-api-link" href="https://developers.google.com/maps/">API Spec</a>
			</div>
			<div class="post external-post">
				<h2 class="api-head">Foursquare API</h2>
				<a class="external-api-link" href="https://developer.foursquare.com/">API Spec</a>
			</div>
			<div class="post external-post">
				<h2 class="api-head">Youtube API</h2>
				<a class="external-api-link" href="https://developers.google.com/youtube/">API Spec</a>
			</div>
			<div class="post external-post">
				<h2 class="api-head">EventBrite API</h2>
				<a class="external-api-link" href="http://developer.eventbrite.com/">API Spec</a>
			</div>
			<div class="post external-post">
				<h2 class="api-head">PayPal API</h2>
				<a class="external-api-link" href="https://developer.paypal.com/">API Spec</a>
			</div>
			<div class="post external-post">
				<h2 class="api-head">SoundCloud API</h2>
				<a class="external-api-link" href="http://developers.soundcloud.com/">API Spec</a>
			</div>
		</div>
		<!-- end #content -->
		<div id="sidebar">
			<a class="twitter-timeline" href="https://twitter.com/Hackathon1212" data-widget-id="247989853675978753">Tweets by @Hackathon1212</a>
		</div>
		<!-- end #sidebar -->
		<div style="clear: both;">&nbsp;</div>
	</div>
	<!-- end #page --> 
</div>
<div id="footer">
	<p>Design by <a href="http://www.freecsstemplates.org/" rel="nofollow">FreeCSSTemplates.org</a>. Images by <a href="http://fotogrph.com/">Fotogrph</a>.</p>
</div>
<!-- end #footer -->

	<script type="text/javascript" src="js/jquery-1.9.1.min.js"></script>
	<script type="text/javascript" src="js/landing-scripts.js"></script>
	<script src="http://platform.twitter.com/widgets.js"></script>

</body>
</html>

<%}else{%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>No Content</title>
</head>
<body>
<br>You are <%= request.getUserPrincipal() %><br>
<a href="<%=UserServiceFactory.getUserService().createLogoutURL(request.getRequestURI())%>">sign out</a><br>
<a href="<%=UserServiceFactory.getUserService().createLoginURL(request.getRequestURI())%>">sign in</a><br>
</body>
</html>
<%}%>